Currently, it is a known technology in which a group of service nodes (for example, servers or service processing units) constitute a service node cluster that is scalable and capable of high-availability network service. In this technology, the group of service nodes in the cluster are connected to each other by using a high-speed local area network or a geographically-distributed wide area network, and one or more dispatching devices (for example, load balancers or dispatching units) exist at a front end of the group of service nodes. The dispatching device can seamlessly schedule a packet from user equipment to a service node. For the user equipment, a structure of the service node cluster is transparent, and the user equipment accesses a service provided by the service node cluster as if accessing a high-performance and high-availability service node.
To ensure service continuity, for multiple packets of a same service, it is required to ensure that the packets can be sent to a same service node for processing.
In view of this, an existing practice is that the dispatching device creates a flow table for each service (or for each passing traffic flow), where the flow table records a mapping relationship between a quintuple of a packet of the service and a service node that processes the service. Specifically, when the dispatching device receives a packet, the dispatching device searches for a flow table according to a quintuple of the packet. If there is no record in the flow table, it indicates that the packet belongs to a new flow, and the dispatching device allocates the packet to a service node at a back end, creates a flow table, and stores a mapping relationship, such as <a quintuple, a selected service node>. If there is a flow table, it indicates that the packet belongs to an existing service, and the dispatching device dispatches the packet to a service node that is stored in the flow table and that is corresponding to a quintuple of the packet, for processing.
However, because concurrent traffic is increasing with rapid development of communications technologies, for example, a quantity of online sessions on a wireless network can generally reach a level of 10 million, processing overheads for querying a flow table are huge, which causes dispatching efficiency to decrease linearly with an increase of sessions. In addition, a relatively large quantity of sessions causes an increase of memory used for storing the flow table. Assuming that a flow table occupies 100-byte (Byte) memory, approximately 1-gigabyte (GB) memory overheads are needed for maintaining 10 million sessions.